<style>
    .mui-row.mui-fullscreen>[class*="mui-col-"] {
        height: 100%;
    }

    .mui-col-xs-3,
    .mui-col-xs-9 {
        overflow-y: auto;
        height: 100%;
    }

    .mui-segmented-control .mui-control-item {
        line-height: 50px;
        width: 100%;
    }


    .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
        background-color: #fff;
    }
    .mui-toast-container {
        bottom: 50%;
    }
    .zcnav {
      left: 0px; right: 0px; top: 70px; z-index: 7;position: fixed; height:40px;line-height: 40px;
    }
    .zcnav a{
      font-size: 16px;
          color: #fff;
    }
    .zcnav span{
      font-size: 16px;
          margin-left: 10px;
              color: #525252;
    }
    .cnavcom{
      margin: 0;
      background-color:#3190e8;
      overflow: hidden;
    }
    .catnav{
         text-align: center;
         display: inline-block;
         width: 25%;
         height: 35px;
         float: left;
         line-height: 35px;
    }

    .catactive{
      color: #fff;
    border-bottom: 2px solid #fff;
    background: 0 0;
    }
</style>
<div class="hdcom">
  <header class="mui-bar mui-bar-nav" style="z-index:7">

  			<h1 class="mui-title">{$companyInfo['title']}</h1>
        <a class="mui-icon mui-icon-contact mui-pull-right" href="{:url('index/order/qiyeindex', ['cid'=>$cid ])}"></a>
  </header>
  <div class="pref-info" style="left: 0px; right: 0px; top: 44px; z-index: 7;position: fixed;">
      <span class="pref-text">{$companyInfo['remark']}</span>
  </div>

  <div class="zcnav">
   <div   class="cnavcom">
   				<div class="mui-card-content">
   					<div class="mui-card-content-inner" style="padding: 2px 0;overflow: hidden;">
               <!-- {empty name="$Think.session.user.phone"}
               <a href="{:url('index/user/info')}">注册会员</a><span>(会员注册后享受会员特权)</span>
                {else /}
                <span style="color:#fff;  font-size: 14px;">hi 会员{$Think.session.user.name}您好,您的积分为{$Think.session.user.integral},你有{$Think.session.user.id|getCouponNum}张优惠券!</span>
               {/empty} -->

             <!--<a   href="{:url('',['cid'=>$cid])}" class="catnav {empty name='$cat_id'}catactive{/empty}">推荐商品</a> -->
                            <div>               {volist name="Goodscatlist"  id="vo"}
                 <a   href="{:url('', ['cid'=>$cid,'catid'=>$vo.id])}" class=" catnav {eq name='$vo.id' value='$cat_id'}catactive{/eq}">{$vo.cat_name}</a>
               {/volist}
  
   					</div>
   				</div>
   	</div>
  </div>

</div>




<div class="mui-content mui-row " style="    padding-top: 108px;    padding-bottom: 50px;">


  {eq name='$is_contact' value='1'}
    <div class="subsc"   style="line-height:30px;"><button type="button" name="button" class="mui-btn-warning">关注客服微信</button> {$contact_dec}</div>
  {/eq}

                  <dl>

                      {volist name="list" id="item"}
                        <dd  data-ruleid="{$item['goodsrule'][0]['id']}"  data-goodid="{$item['id']}" style="padding-bottom: 0;">
                            <span class="foodimg" style="    flex: 7;"><img  src="{$item['cover_id']|get_cover='path','400x218'}" style="height:120px;" data-preview-src="" data-preview-group="{$item['id']}">

                              (点击图片放大缩小图片)
                            </span>
                            <section class="foodinfo" style="    padding: 0;"   >
                                <div onclick='javascript:window.location.href="{:url('goods/qiyedetail',['id'=>$item['id'],'cid'=>$cid])}"' >
                                  <header class="foodtitle" ><span>{$item['good_name']}{eq name="$item.is_timelimit" value="1"}<span style="color:red">(限时团购)</span>
                                    {/eq}</span>
                                  </header>
                                  <!-- <p class="mui-ellipsis fooddescription" style="margin:3px 0;">商家:{$item['shop_id']|get_table_field="id","shopname","goodshops"}</p> -->


                                  <p class="fooddescription"  style="margin:3px 0;font-weight: bold;color:red;">配送说明:

                                    {eq name="$item.isshowdelivery" value="1"}
                                      {$item['deliverydec']}
                                    {else \}
                                      {$companyInfo['delivery_dec']}
                                    {/eq}

                                  </p>


                                  {eq name="$item.is_timelimit" value="1"}
                                    {if condition="strtotime($item->startlimit) < intval(time()) && intval(time()) < strtotime($item->endlimit)"}
                                      <p class="fooddescription endlimit"   data-endtime = "{$item.endlimit}" data-starttime = "{$item.startlimit}"  style="margin:3px 0;font-weight: bold;"></p>
                                    {elseif condition="strtotime($item->startlimit) > intval(time())"/}
                                    <p class="fooddescription  hidecartbtn" data-id="{$item.id}"   style="margin:3px 0;color:red">团购未开始：{$item.startlimit} —— {$item.endlimit}</p>
                                    {else /}
                                    <p class="fooddescription  hidecartbtn" data-id="{$item.id}"  style="margin:3px 0;color:red">团购已结束：{$item.startlimit} —— {$item.endlimit}</p>
                                    {/if}
                                  {/eq}






                                    <p class="fooddescription"  style="    margin: 0 0 40px 0;color:#000;font-weight: bold;">特色描述:{$item['good_desc']} <br />
                                      {neq name="$item['goodsrule'][0]['quota']" value='0'}
                                          限购：{$item['goodsrule'][0]['quota']}份
                                      {/neq}


                                    </p>


                                  {php}
                                     $priceArr = array();
                                     foreach($item['goodsrule'] as $data){
                                        $priceArr[]= $data['rule_price'];
                                     }
                                     $minPrice = min($priceArr);
                                     if(count($priceArr) > 1){
                                          $minPriceHtml = "<span>".$minPrice."</span><span class='foodprice-lowest'>起</span>";
                                     }else{
                                        $minPriceHtml = "<span>".$minPrice."</span>";
                                     }
                                  {/php}


                                  {if condition="$is_showprice eq 1"}
                                    {neq name="$minPrice" value="0.00"}
                                        {if condition="groupModel() gt 0"}
                                            <strong class="foodprice" style="bottom: 10px;">{$minPriceHtml}  </strong>
                                        {else /}
                                        <strong class="foodprice" style="bottom: 10px;">{$minPriceHtml} </strong>
                                        {/if}
                                    {/neq}
                                  {/if}

                                </div>
                                <div class="mask mask-transition" style="display:none;">
                                    <div class="wrap">
                                        <div class="container">
                                            <div class="specpanel">
                                                <h1>{$item['good_name']}</h1>
                                                <div class="candidators">
                                                    <div class="candidators-group">
                                                        <h2>规格</h2>
                                                          {volist name="$item['goodsrule']" id="voo"  }
                                                            <a href="javascript:" class="candidator {eq name='$i' value='1'}selected {/eq}" data-info="{$voo[rule_name]}|{$voo[rule_price]}|{$voo[stock]}|{$voo[weight]}" data-ruleid="{$voo[id]}">{$voo[rule_name]}</a>
                                                          {/volist}
                                                    </div>
                                                    <div class="selectedresult">
                                                        <p class="selectedstr">已选：{$item['goodsrule'][0]['rule_name']} <span class='stock'>库存：{$item['goodsrule'][0]['stock']}</span> <span class='weight'>重量：{$item['goodsrule'][0]['weight']}</span></p>
                                                        <p class="price"><span class="yen">¥</span> <span class="now">{$item['goodsrule'][0]['rule_price']}</span> </p>
                                                    </div>
                                                    <a href="javascript:" class="cartadd" data-id="{$item['id']}" data-ruleid="{$item['goodsrule'][0]['id']}" data-dismiss="cart" data-methods="addmore" >加入购物车</a>
                                                    <a href="javascript:" class="close"></a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                              </div>
                              {if condition="$is_showprice eq 1"}
                                {neq name="$minPrice" value="0.00"}
                                  <div class="cartbutton" style="    bottom: 5px;">
                                    <span>
                                      <span class="entitybutton">
                                        {$item['id']|getRulenumhtml}
                                        {if condition="count($item['goodsrule']) gt 1 "}
                                          <a href="javascript:" class="specadd cartbtn{$item['id']}"  ><span class="entityspecbutton"  >选规格</span></a>
                                        {else /}


                                          {eq name="$info.goodsrule[0]['stock']" value="0"}
                                                <a href="javascript:"  ><span class="entityspecbutton" style="background-color: #ce4747;">已售罄</span></a>
                                          {else/}
                                            <a href="javascript:" class="oneaddcart cartbtn{$item['id']}" data-dismiss="cart" data-methods="addone" ><span class="mui-icon mui-icon-plus"></span></a>
                                          {/eq}

                                        {/if}
                                      </span>
                                    </span>
                                </div>
                                {/neq}
                              {/if}



                            </section>



                        </dd>

                      {/volist}
                  </dl>



      </div>



    </div>

    <div class="cartmask fold-transition" _v-fd8ba416="" style="z-index: 8;display: none;"></div>
    <div class="cartbody fold-transition"  style=" z-index: 9;display:none;">
        <div class="cartheader" ><span class="cartheader-text" >购物车</span> <a href="javascript:" class="cartheader-remove" ><span class="mui-icon mui-icon-trash"></span> <span >清空</span></a></div>
        <div class="cartbody-scroller" >
            <!-- <div class="piecewise-tips" ><b >阶梯配送费</b> 满70免配送费</div> -->
            <ul class="cartlist" >
            </ul>
            <script id="tpl" type="text/html">
            {{each  as value i}}
              <li class="entityrow" data-boxruleid="{{value.rule_id}}" data-boxgoodid="{{value.good_id}}"  >
                <span class="entityname" ><em class="name" >{{value.good_name}} {{value.rule_name}}</em></span>
                <span class="entitytotal" >{{value.good_price*value.num}}</span>
                <span  class="entitycartbutton">
                  <span class="entitybutton">
                    <a href="javascript:" data-dismiss="cart" data-methods="minusbox" data-cartid="{{value.id}}"  style="padding:0" ><span class="mui-icon mui-icon-minus"></span></a>
                    <span class="entityquantity">{{value.num}}</span>
                    <a href="javascript:" data-dismiss="cart" data-methods="addbox" style="padding:0" ><span class="mui-icon mui-icon-plus"></span></a>
                  </span>
                </span>
              </li>
            {{/each}}
            </script>
        </div>
    </div>

    {if condition="!$is_member OR $Think.session.user.name "}
    <nav class="mui-bar mui-bar-tab tgou" style="      border-bottom: none;    background-color: #3d3d3f;    padding-left: 2.164384rem;">
        <span class="carticon {empty name='$cart.num'}empty{/empty}"  attr-quantity="{$cart.num}"></span>
        <div class="cartprice" ><span class="carttotal" >¥<i>{$cart.price}</i></span> <span class="cartdelivery" ></span></div>

        {if condition="$cart.price gt cookie('init_price')"}<a href="javascript:;" data-url="{:url('index/cart/index')}" class="submitbutton tgxd" >去结算</a>
          {elseif condition="$cart.price eq 0"/}<a href="javascript:;" data-url="" class="submitbutton" >{:cookie('init_price')}起送</a>
          {else /} <a href="javascript:;" data-url="" class="submitbutton" >还差{:abs($cart.price - cookie('init_price'))}元</a>
        {/if}

    </nav>
  {else /}
  <nav class="mui-bar mui-bar-tab tgou" style="      border-bottom: none;    background-color: #f60; text-align:center;line-height:50px;">
    <a href="{:url('index/user/info')}" style="color:#fff;font-size:18px;">注册会员</a>
  </nav>

  {/if}


  <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" charset="utf-8"></script>
  <script>
      wx.config({$wxoptions|json_encode});
      wx.error(function(e){
        	console.log(e);
        });
      wx.ready(function(){
        wx.onMenuShareTimeline({
            title: "{$companyInfo['title']}",
            link: "",
            imgUrl: "http://www.xgw0851.com/{$companyInfo['mt_image']|get_cover='path'}",
        });
        wx.onMenuShareAppMessage({
            title: "{$companyInfo['title']}",
            desc: "{$companyInfo['remark']}", // 分享描述
            link: "",
            imgUrl: "http://www.xgw0851.com/{$companyInfo['mt_image']|get_cover='path'}",

        });
      });
  </script>

</div>
